// 导入自己封装的已经连接的mongoose
const mongoose = require('./connect')

// 商品表的schema
const authSchema = new mongoose.Schema({
    name: {
        required: true,
        type: String
    },
    path: {
        required: true,
        type: String
    },
    parentId: {
        required: true,
        type: String
    },
    isShow: {
        required: true,
        type: Boolean
    },
    icon: String
})

const authModel = mongoose.model('auth', authSchema, 'auth')


// 导出model
module.exports = authModel